// redux 的日志操作中间件
const logger = ({ getState, dispatch }) => next => action => {
  console.group('action的type' + action.type)
  console.log('正在触发的action:', action)
  const result = next(action)
  console.log('正在使用的state', getState())
  console.groupEnd()
  return result
}

export default logger